package com.southpark.demo.services
{
	import com.southpark.demo.interfaces.services.IServices;
	import com.southpark.system.interfaces.managers.IApplicationManager;
	
	import mx.rpc.http.HTTPService;
	import mx.rpc.soap.WebService;
	
	
	
	public class Services implements IServices
	{
		
		public function Services(applicationManager:IApplicationManager)
		{
			this.applicationManager = applicationManager;
		}
		
		private var applicationManager:IApplicationManager;
		
		
		
		private var _httpService:HTTPService;
		public function get httpService():HTTPService
		{
			if (!_httpService)
			{
				_httpService = new HTTPService();
				_httpService.resultFormat = HTTPService.RESULT_FORMAT_E4X;
				_httpService.requestTimeout = 20;
			};
			
			return _httpService;
		}
		
		private var _webService:WebService;
		public function get webService():WebService
		{
			if (!_webService)
			{
				_webService = new WebService();
				_webService.showBusyCursor = true;
			};
			
			return _webService;
		}
		

	}
}